package com.gmadmin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gmadmin.entity.MessageNotice;
import com.gmadmin.entity.vo.MessageNoticeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zhangliang
 * @version 1.0
 * @date 2022/8/2 20:18
 */
@Mapper
public interface MessageMapper extends BaseMapper<MessageNotice> {


    /**
     * 分组获取当前用户的通知消息ids
     *
     * @param receiveId 接收人用户id
     * @param state     0未读 1已读,null 全部未删除
     * @return 通知消息以及详情
     */
    List<MessageNotice> findListByReceiveIdAndType(@Param("receiveId") Long receiveId, @Param("type") Long type, @Param("state") Long state);


}
